home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CD ROM Paradise Collection 4
/
CD ROM Paradise Collection 4 1995 Nov.iso
/
filutil
/
mdf130.zip
/
MDF_ENG.DOC
< prev
next >
Wrap
Text File
|
1995-01-12
|
11KB
|
352 lines
MDIFF - MPATCH
Release 1.3
Simple but complete program to produce and apply patches to your programs
and data files.
English version.
(C) 1994/95 Maurizio Giunti - All rights reserved
0.INDEX
0.INDEX 2
1.WHY? 3
2.WHAT MDIFF-MPATCH DO? 3
3.DOS AND OS/2 3
4.LIMITS 3
5.MDIFF - MDIFF2 3
6.MPATCH - MPATCH2 4
7.ADVICES 4
8.RIGHTS 5
9.WARRANTY 5
10.LIBRARIES TO APPLY PATCHES 5
11.HOW TO REGISTER 5
12.ACKNOWLEDGEMENTS 6
2
1.WHY?
A few month ago I was updating a program of mine: the commpressed packet
was about 200 Kbytes I thought it was better to use a patch, but I could
not find a program of my satisfaction among the patch makers/appliers. In
addition I could not trace a program that could run under DOS and OS/2.
I decided to make my own patch software and.....here it is ! 8-)
2.WHAT MDIFF-MPATCH DO?
MDIFF creates a binary difference between two files. With MPATCH and the
older file you can create a new file using the difference file. What is
the advantage? Usually the difference file is smaller and therefore more
suitable for distribution, especially by modem.
3.DOS AND OS/2
In the distribution packet you will find 4 executable files, 2 for Dos
and 2 for OS/2 32bits. There is no difference in functions and use of the
different versions. Difference files produced with MDIFF for Dos can be
used with MPATCH for OS/2 and vice-versa.
4.LIMITS
MDIFF can't work on files greater than 16 Mbytes. There are no other
limits to MDIFF's work.
5.MDIFF - MDIFF2
MDIFF compares 2 files and stores the differences between them in a
difference file. This is the command line syntax:
MDIFF [-C<c>] [-R<r>] [-F<f>] [-S] [-Z] <OldFile> <NewFile> [<MDFfile>]
<OldFile> is the name of the older file, <NewFile> is the name of the new
file. If you wish you can specify the name of the difference file that
MDIFF will produce, otherwise MDIFF will create a file with the name of
the new file but with the extension ".MDF".
To search differences between files, MDIFF use a base string of defined
length named Chunk. The Chunk length is by default 16 bytes, but you can
change it, in the range 4-256, with the -C switch followed by the desired
length.
When MDIFF loses the synchronism between the two files being compared, it
scans the older file searching the current chunk. This scansion is
executed, by default, in a range of 8 blocks of 512 bytes each. You can
change the number of the blocks scanned, in the range 1-16, with the -R
switch followed by the desired number of blocks.
If this search fails, MDIFF tries to force synchronization through a
large range search. This range is defined as 1/16 of the old file lenght,
but you can change it by the -F switch on the command line.
3
If you specify -S switch, MDIFF will provide some information about the
composition of the difference file.
Moreover you can add to the difference file produced a short comment (max
2 Kbytes) to display when the patch is applied, with the -Z switch. MDIFF
gets the comment from standard input, so you can type it directly or
redirect it from a file with the "<" command.
6.MPATCH - MPATCH2
With the old file and the .MDF file you can rebuild the new file by
running MPATCH. This is the command line syntax:
MPATCH <MDFfile> [<OldFile>] [<NewFile>]
MPATCH needs only the name of the mdf file (<MDFfile>) because it
contains the names of the other 2 files, but it's possible to override
these names specifying the desired names on the command line. MPATCH does
not have any switches.
If there are errors during the patch applying, MPATCH returns an
errorlevel as follows:
0 "OK!"
1 "Out of memory !"
2 "Can't open MDF file !"
3 "Invalid MDF file !"
4 "MDF file version mismatch !"
5 "UNREGISTERED !"
6 "Bad or incorrect OLD file !"
7 "Can't open OLD file !"
8 "Can't create NEW file !"
9 "General failure: NEW file corrupted !"
10 "OLD and NEW can't be the same file !"
7.ADVICES
The best method to build a difference file, is to search the chunks of
the new file in the entire older file, but this is a very slow way to do
!
MDIFF's algorithm tries to give a small diff file in the faster way; so
you are sometimes required to tune the work parameters with the command
line switches.
Let's look at some typical situations:
Very similar files: use a large chunk (32, 64 or more) to reduce the 1.
size of the diff file, in particular if the files contain text or
archives.
2. Text files: try to use a chunk size of 32, sometimes it is better to
turn the forced sync off or reduce its range by the -F switch.
3. Very large executable: try to use a larger resync range (16 or more),
with the -R switch.
Remember: MDIFF can't make miracles! If the two files are really
different, the patch will result very large. In this situation you must
distribute the entire new file. MDIFF is useful only when the number of
changes is limited.
4
8.RIGHTS
This software belongs to Shareware programs: anyone can freely distribute
and use it for a trial period of 15 days. After this period, users that
continue to use it must register their copy by sending the registration
fee to the author, Maurizio Giunti.
The registered users will receive a "registration key".
Tis sofware can be freely distributed at no cost, except for eventual
copy and/or shipping expensee. It is imperative anyway that the ORIGINAL
PACKET is distributed without any modification WHATSOEVER.
There is an exception: you can distribute MPATCH.EXE (or MPATCH2.EXE)
with one or more *.MDF files produced with a REGISTERED copy of MDIFF.
9.WARRANTY
The only warranty that comes with this software is that it will occupy
disk space. I absolutely can NOT warrant that it will perfectly work, or
that it will be your problems' solution.
Nevertheless, it is not a virus and does not contain (unless infected or
modified after the compilation) Trojan-horses, backdoors and similar
tricky garbage. In any case, the author is not responsible for any
damage, moral or material, direct or indirect, derived from its use.
10.LIBRARIES TO APPLY PATCHES
Inside this distribution packet you will find some libraries for Dos,
Windows and OS/2 32bits, to build your own programs to apply patches
produced by MDIFF.
These libraries will work ONLY with *.MDF files produced by a REGISTERED
copy of MDIFF.
The distribution packet is complete with sample sources in C, C++ and
VisualBasic and all the needed documentation.
11.HOW TO REGISTER
The individual registration key costs Italian Liras 25,000 (approx U.S. $
16.-). Site licenses available on request.
The key is valid for both DOS and OS/2 version of the software.
The registration key will be sent by mail. If explicity requested, it can
also be sent via Internet e-mail.
The registration fee can be paid according to your preference, by check
or postal order (in Italy) or International Money Order (I.M.O.), from
abroad, payable to:
Maurizio Giunti
Via G.B. Foggini, 24
50142 Firenze (FI)
ITALY
It is better to indicate on the order the name of the program you want
to register, your name, address and FAX number or e-mail address (where
5
available). For short notes, use the appropriate space on the postal
order (if present), or send an e-mail to Maurizio Giunti at:
Fidonet: 2:332/102.3
Internet: giunti@stat.ds.unifi.it
12.ACKNOWLEDGEMENTS
I'd like to thank all those who helped me to develop this software and
its documentation and all those who helped me in beta-testing. In
alphabetical order:
Andrea Baitelli
Silvia Borri
Filippo Dini
Fabrizio Fioravanti
Cristiano Guidoccio
Giovanni Lopes Pegna
Marco Maccaferri
Marco Menichelli
Giuseppe Scarpi
Toni Tatafiore
6